<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // + :字符串拼接符
        // let a = 10;
        // let b = 2;

        // console.log(a);
        // console.log(a + b + a + b); // '102'


        // let name = "张三";
        // let age = 20;

        // name = "李四";


        // console.log("你好，我叫" + name + "，今年" + age + "岁。");

        // 模板字符串 ${}
        // console.log(`你好，我叫${name}，今年${age}岁。`);

        let a = 20;
        let b = 4;

        // 20 + 4 = 24
        console.log(a + " + " + b + " = " + (a + b));
        console.log(`${a} + ${b} = ${a + b}`);




    </script>
</body>

</html>